﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ST.Core;
using ST.ModelVM.ProtocolDefine;

namespace ST.ModelVM.ProtocolSim
{
    public class ProtocolSimAddVM : Int64Model
    {

        public Int64 ProtocolDefineId { get; set; }
        [NotMapped]
        public string ProtocolName { get; set; } = "";

        [NotMapped]
        public string RunState { get; set; } = "停止";


        [MaxLength(100)]
        public string Name { get; set; } = "";



        [MaxLength(100)]
        public string Mode { get; set; } = "TCP"; //TCP  UDP  串口
        [NotMapped]
        public string ModeMessage { get; set; } = ""; //TCP  UDP  串口
        public int Port { get; set; }


        public string ComPort { get; set; } = "";  // 串口号
        public int BaudRate { get; set; } = 9600;      // 波特率
        public int DataBits { get; set; } = 8;         // 数据位
        public string Parity { get; set; } = "None";   // 校验位
        public string StopBits { get; set; } = "One";  // 停止位


        public byte HostId { get; set; }  

    }
}
